<template>
  <div class="box">
    <main>
      <el-card class="box-card">
        <template #header>
          <div class="card-header">
            <span>{{ route.name === "loginview" ? "登录" : "注册" }}</span>
          </div>
        </template>
        <div><router-view></router-view></div>
      </el-card>
    </main>
  </div>
</template>

<script lang="ts" setup>
import { useRoute } from 'vue-router';
const route = useRoute();
</script>

<style scoped lang="scss">
.box {
  width: 100%;
  height: 100%;
  background-color: antiquewhite;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url(../assets/login.jpg) no-repeat;
  background-size: cover;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.box-card {
  width: 480px;
}
</style>
